import tester.cobertura.Instrument;

// to represent a book
@Instrument
class Book implements IsSame<Book>, IValue<Book>, MakeString<Book>/*, ISelectable<Image>*/{
	String title;
	String author;
	int price;
	
	Book(String title, String author, int price){
		this.title = title;
		this.author = author;
		this.price = price;
	}
	
	/* TEMPLATE
	 * ... this.title ...       -- String
	 * ... this.author ...      -- String
	 * ... this.price ...       -- int
	 * 
	 * ... this.size() ...       -- boolean
	 * ... this.isSame(Book) ... -- boolean
	 */
	
	// compute the value of this song - determined by its price
	@Override
	public int value(){
		return this.price;
	}


	// is this book the same as the given book?
	@Override
	public boolean isSame(Book that){
		return this.title.equals(that.title) &&
		       this.author.equals(that.author) &&
		       this.price == that.price;
	}

	// a method to covert types to a string representation.
	@Override
	public String makeString(){
		return this.title + "-" +  this.author + "-" +  Integer.toString(this.price);
	}

	/*
	@Override
	public boolean pick() {
		// TODO Auto-generated method stub
		return false;
	}
	*/
}